<!--<?php print <<<EOT
-->
<style type="text/css">
.wy_menu_B{border:1px solid #aaa;background:#ffffff url(c_editor/wy_menu_bg.png) repeat-x; position:absolute;padding:5px 0;border-left:1px solid #ccc;border-top:1px solid #ccc;}
.wy_menu_B a{color:#333;}
.wy_menu_B a:hover{ text-decoration:none;color:#3366cc;}
.wy_menu_B h4{display:block; font-size:14px; font-weight:700;color:#3366cc;padding:5px 10px;margin:0}
.wy_menu_B .tr1{padding-left:70px;text-align:center;}
.wy_menu_B .tr3{padding:4px 0 4px 10px;text-align:right;}
.wy_menu_B td{padding:4px 0 4px 10px;text-align:right;}
.wy_menu_B a.fr{color:#3366cc;}
</style>
<!--
EOT;
if(GetGP('vip')=='activating'){print <<<EOT
-->
<div id="breadCrumb">
		<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>注册
</div>
<div id="pw_content">
	<div class="p20">
		<div class="regTitle cc">
			<h5>邮件激活</h5>
		</div>
		<table width="100%"><tr><td class="vt" height="200">
		<form action="$db_registerfile?" method="post" name="register">
		<input type="hidden" name="verify" value="$verifyhash" />
		<input type="hidden" name="step" value="finish" />
		<input type="hidden" name="option" value="1" />
			<div class="f16 b tac mb20">亲爱的会员，您邮件激活成功。</div>
			<div class="tac">
				<span class="mr20"><span class="btn"><span><button onclick="window.location.href='$loginurl'" type="button">立即登录</button></span></span></span>
				<a href="./$db_bfn" class="s4">先去逛逛</a>
			</div>
		</form>
		</td></tr></table>
	</div>
</div>
<!--
EOT;
}elseif(!$step && $step!=2){print <<<EOT
-->
<div id="breadCrumb">
		<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>注册
</div>
<div id="pw_content">
	<div class="p20">
		<div class="regTitle cc">
			<span class="fr">已经拥有帐号？<a href="login.php#breadCrumb" class="s4">请在此登陆</a></span>
			<h5>注册<!--请填写以下必填信息完成注册--></h5>
		</div>
		<table width="100%"><tr><td class="vt" height="300" style="padding-bottom:30px;">
		<form action="$db_registerfile?" method="post" name="register" onSubmit="return checkAll();">
		<input type="hidden" value="$forward" name="forward" />
		<input type="hidden" value="2" name="step" />
		<input type="hidden" value="cn0zz" name="_hexie" />
<!--
EOT;
$tmpVerify = GetVerify($onlineip);print <<<EOT
-->
<script type="text/javascript">
document.register._hexie.value='$tmpVerify';
</script>
		<div class="regForm">
<!--
EOT;
if($db_sitemsg['reg']['0']){
print<<<EOT
-->
<div class="blockquote mb20" style="margin-top:-30px;">{$db_sitemsg[reg][array_rand($db_sitemsg[reg])]}</div>
<!--
EOT;
}print<<<EOT
-->
<!-- 输入框，悬停样式 hover 正确 current-->
			<dl>
				<dt><label for="regname">用户名<span class="s1">*</span></label></dt>
				<dd class="ip"><div class=""><input type="text" name="regname" id="regname" value="" maxlength="$regmaxname" /></div></dd>
				<dd class="tp"><div id="regname_info"></div></dd>
			</dl>
			<dl style="min-height:60px;_height:60px;">
				<dt><label for="regpwd">密&#160;&#160;码<span class="s1">*</span></label></dt>
				<dd class="ip"><div><input type="password" maxlength="$regmaxpwd" name="regpwd" id="regpwd" onKeyUp="CreateRatePasswdReq(this,'$regminname');" /></div></dd>
				<dd class="tp"><div id="pwd_info"></div></dd>
			</dl>
			<div style="margin:-30px 0 5px 115px;" class="cc">
				<table id="passwdBar" width="230" class="fl mr5" style="margin-top:7px;background:#e5e9eb;">
					<tr>
						<td id="posBar" style="width:0px;padding:0;border-right:0;height:4px;background:#e5e9eb;"></td>
						<td id="negBar" style="padding:0;border-right:0;height:4px;background:#e5e9eb;"></td>
					</tr>
				</table>
				<div id="passwdRating" class="fl gray">密码强度</div>
			</div>
			<dl class="cc">
				<dt><label for="regpwdrepeat">确认密码<span class="s1">*</span></label></dt>
				<dd class="ip"><div><input type="password" maxlength="75" name="regpwdrepeat" id="regpwdrepeat" /></div></dd>
				<dd class="tp"><div id="pwdrepeat_info"></div></dd>
			</dl>
			<dl class="cc">
				<dt><label for="regemail">电子邮箱<span class="s1">*</span></label></dt>
				<dd class="ip"><div class=""><input type="text"  maxlength="75" name="regemail" value="" id="regemail"/></div>
				<!--p class="cc"><label><input type="checkbox" name="regemailtoall" value="1" style="width:auto;padding:0;margin:0;" /> 公开邮箱</label></p-->
				</dd>
				<dd class="tp"><div id="email_info">
<!--
EOT;
if($rg_config['rg_emailtype'] == '1' && $rg_config['rg_email']){print <<<EOT
-->
					为避免无法收取站点邮件，请使用以下邮箱进行注册:<br />({$rg_config[rg_email]})
<!--
EOT;
} elseif($rg_config['rg_emailtype'] == '2' && $rg_config['rg_banemail']){print <<<EOT
-->
					为避免无法收取站点邮件，以下邮箱无法进行注册:<br />({$rg_config[rg_banemail]})
<!--
EOT;
}print<<<EOT
--></div>
				</dd>
			</dl>
<!--
EOT;
if($rg_config['rg_allowregister']==2){print <<<EOT
-->
			<dl>
				<dt><label for="invcode">邀请注册码<span class="s1">*</span></label></dt>
				<dd class="ip"><div><input type="text" value="$invcode" name="invcode" id="invcode" /></div></dd>
				<dd class="tp"><div id="invcode_info"></div>
				<span style="display:none;">
<!--
EOT;
if($inv_config['inv_onlinesell']){print <<<EOT
--><span id="buy_invitecode"><p><a href="javascript:;" class="s4" onclick="insertOnlineSell();">购买邀请码</a></p></span>
<!--
EOT;
}print <<<EOT
--></span>
				</dd>
			</dl>
<!--
EOT;
}if($regq && $db_question){
$qkey = array_rand($db_question);
$db_question[$qkey] = addcslashes($db_question[$qkey],'"');
print <<<EOT
-->
			<dl>
				<dt><label for="regpwdrepeat">防恶意注册<span class="s1">*</span></label></dt>
				<dd class="ip"><div><input type="text" name="qanswer" id="qanswer" /><input type="hidden" id="regqkey" name="qkey" value="$qkey" /></div></dd>
				<dd class="tp"><div id="qanswer_info"></div></dd>
<!--
EOT;
if($showq){print <<<EOT
-->
				<dd class="regTips"><span id="qanswer_info">正确答案:$db_answer[$qkey]</span></dd>
<!--
EOT;
}print <<<EOT
-->								

			</dl>
<!--
EOT;
}if($rg_config['rg_ifcheck']){print <<<EOT
-->
			<dl>
				<dt>注册原因<span color="s1">*</span></dt>
				<dd class="ip">
					<textarea name="regreason" rows="4" cols="50" class="textareaA"></textarea>
				</dd>
				<dd class="tp"></dd>
			</dl>
<!--
EOT;
}if($customfield){
$fields = array();
print <<<EOT
-->
				<!--dl>
					<dt><span class="bb b s4">附加信息</span></dt>
					<dd>&nbsp;</dd>
					<dd class="tp">&nbsp;</dd>
				</dl-->
<!--
EOT;
foreach($customfield as $key=>$val){
$ids = '';
$field="field_".(int)$val[id];
$fieldinfo = $field."_info";
$required=$val[required]?'<span class="s1">*</span>':'';
$editable=(!$userdb[$field]||$val[editable])?'':'disabled';
!$val[editable] && $val[descrip] .='(请认真填写该栏信息，填写后将不允许修改)';
if($val[type]=='1'){
	if($val[required]){
		$fields[] = array('field'=>$field,'type'=>'text','descrip'=>$val[descrip]);
		$ids = "id=\"$field\"";
	}
	$field_type="<div><input type=\"text\" name=\"$field\" $ids /></div>";
}elseif($val[type]=='2'){
	if($val[required]){
		$fields[] = array('field'=>$field,'type'=>'textarea','descrip'=>$val[descrip]);
		$ids = "id=\"$field\"";
	}
	$field_type="<textarea name=\"$field\" $ids style=\"width:222px;margin-bottom:10px;\" class=\"textareaA\"></textarea>";
}elseif($val[type]=='3'){
	$field_type="<select name=\"$field\" id=\"$field\">";
	$options=explode("\n",$val[options]);
	foreach($options as $k=>$v){
		list($k,$v)=explode('=',$v);
		$field_type.="<option value=\"$k\">$v</option>";
	}
	$field_type.="</select>";
}
print <<<EOT
-->
			<dl class="cc">
				<dt>$val[title]{$required}</dt>
				<dd class="ip">{$field_type}</dd>
				<dd class="tp"><div id="$fieldinfo" class="ignore">$val[descrip]</div></dd>
			</dl>
<!--
EOT;
}}print <<<EOT
-->
<!--
EOT;
if($db_ifsafecv){print <<<EOT
-->
			<dl>
				<dt>安全问题</dt>
				<dd class="ip">
					<select name="question" onchange="showcustomquest(this.value)" style="width:230px">
						<option value="0" id="question_0">无安全问题</option>
	<option value="1">我爸爸的出生地</option>
	<option value="2">我妈妈的出生地</option>
	<option value="3">我的小学校名</option>
	<option value="4">我的中学校名</option>
	<option value="5">我最喜欢的运动</option>
	<option value="6">我最喜欢的歌曲</option>
	<option value="7">我最喜欢的电影</option>
	<option value="8" >我最喜欢的颜色</option>
	<option value="-1" id="question_99">自定义问题</option>
					</select>
				</dd>
				<dd class="tp"><div id="customquested_info"><!--如果启用了安全问题，需要填写正确的答案才能登录站点--></div></dd>
			</dl>
			<dl id="customquested" style="display:none">
				<dt>自定义问题</dt>
				<dd class="ip"><div><input type="text" name="customquest"></div></dd>
				<dd class="tp">&nbsp;</dd>
			</dl>
			<dl>
				<dt>您的答案</dt>
				<dd class="ip"><div><input type="text" name="answer" class="input" id="answered"></div></dd>
				<dd class="tp"><div id="answered_info"></div></dd>
			</dl>
<!--
EOT;
}if($custominfo){
print <<<EOT
-->
				<!--dl>
					<dt><span class="bb b s4">选填信息</span></dt>
					<dd>&nbsp;</dd>
					<dd class="tp">&nbsp;</dd>
				</dl-->
<!--
EOT;
foreach($custominfo as $key=>$val){
if(substr($val[3],0,1)=='1'){print <<<EOT
-->
				<dl>
					<dt>$val[0]</dt>
					<dd class="ip"><div><input type="text" name="customdata[$key]" value="" /></div></dd>
					<dd class="tp"><div class="ignore">$val[1]</div></dd>
				</dl>
<!--
EOT;
}}}if($db_gdcheck & 1){print <<<EOT
-->

				<dl class="cc mb10">
						<dt><label for="gdcode">认证码<span class="s1">*</span></label></dt>
						<dd class="ip ck">
							<div><input id="gdcode" name="gdcode" value="" /></div>
							<span id="menu_gd"></span>
							<img src="ck.php?nowtime=$timestamp" align="top" onclick="try{opencode('',this,'register_ckcode')}catch(e){}" class="cp" id="register_ckcode" alt="看不清楚，换一张" title="看不清楚，换一张" />
						</dd>
						<dd class="tp"><div id="gdcode_info"></div></dd>
				</dl>
<!--
EOT;
}print <<<EOT
-->
				<dl style="min-height:25px;" class="cc">
					<dt>&nbsp;</dt>
					<dd class="mr10"><label><input type="checkbox" name="rgpermit" value="1" id="registerclause" />&nbsp;我已阅读并完全同意 <a onclick="permit();" style="cursor:pointer" class="b s4">条款内容</a></label></dd>
					<dd class="tp"><div id="registerclause_info"></div></dd>
				</dl>
				<dl>
					<dt>&nbsp;</dt>
					<dd>
						<span class="btn"><span><button type="submit">提交注册</button></span></span>
						<span class="bt"><span><button type="reset">重 置</button></span></span>
					</dd>
					<dd class="regTips">
					</dd>
				</dl>
		</div>
		</form>
		</td></tr></table>
	</div>
</div>
<script type="text/javascript" language="JavaScript" src="js/pw_register.js"></script>
<script type="text/javascript" language="JavaScript" src="js/passwordstrength.js"></script>
<script language="JavaScript">
var charset = '$db_charset';
var retminname	= parseInt('$regminname');
var regmaxname	= parseInt('$regmaxname');
var rglower		= parseInt('$rg_config[rg_rglower]');
var regminpwd 	= parseInt('$rg_regminpwd');
var regmaxpwd 	= parseInt('$rg_regmaxpwd');
var regnpdifferf= parseInt('$rg_config[rg_npdifferf]');
var regemail	= parseInt('$rg_config[rg_emailcheck]');
var regdetail	= parseInt('$rg_config[rg_regdetail]');

var inticlass 	= "ignore";
var rightclass	= "correct";
var falseclass	= "wrong";

var pwdcomplex	= '$rg_config[rg_pwdcomplex]';
var extracheck	= new Array();
var regInfo 	= new Array();

regInfo[0] 		= new Array(
						"",
						"用户名长度错误！",
						"此用户名包含不可接受字符或被管理员屏蔽,请选择其它用户名",
						"为了避免站点用户名混乱,用户名中禁止使用大写字母,请使用小写字母",
						"该用户名已经被注册，请选用其他用户名。" ,
						"用户名不能为空！",
						"不能有空格，可以是中文，长度控制在 "+retminname+"-"+regmaxname+" 字节以内 " + (rglower?"区分大小写":"不区分大小写"));
var regname 	= new Element("regname",regInfo[0],"regname_info");

regInfo[1] 		= new Array(
						" ",
						"密码设置错误。密码中必须包含小写字母。",
						"密码设置错误。密码中必须包含大写字母。",
						"密码设置错误。密码中必须包含数字。",
						"密码设置错误。密码中必须包含符号。",
						"密码设置错误。密码长度过小。",
						"密码设置错误。密码过长。",
						"密码设置错误。密码不允许和用户名相同。",
						"密码设置错误。密码不允以下字符:\\ & ' \" ! / * , < > % # ?。",
						"不允许注册帐号与密码相同。",
                        getPwdRule());
var regpwd 		= new Element("regpwd",regInfo[1],"pwd_info");

regInfo[2] 		= new Array(
						" ",
						"两次输入的密码不一致。请再输入一次您上面输入的密码。",
						"请再输入一遍您上面填写的密码");
var regpwdrepeat= new Element("regpwdrepeat",regInfo[2],"pwdrepeat_info");

regInfo[3] 		= new Array(
						" ",
						"您的填写有误。",
						"该邮箱已被注册，请更换别邮箱。",
						"请填写真实并且最常用的邮箱。"+(regemail?"我们需要通过邮箱对您进行认证。":""),
						"邮箱不是系统指定的邮箱地址，不能注册",
						"请输入正确的邮箱地址");
var regemail 	= new Element("regemail",regInfo[3],"email_info");

if(parseInt("$db_gdcheck")&1){
	regInfo[4] 	= new Array(
						" ",
						"验证码不正确。",
						"登录已超时,请刷新验证码。",
						"请输入验证码。"	);
	var gdcode 	= new Element("regemail",regInfo[4],"gdcode_info");
}
if(getObj('regqkey')){
	regInfo[5] 	= new Array(
						" ",
						"验证答案错误。",
						"问题:$db_question[$qkey]<br />请输入答案:$db_answer[$qkey]"	);
	var qanswer = new Element("qanswer",regInfo[5],"qanswer_info");
}
if(parseInt("$rg_config[rg_allowregister]")==2){
	var buy_invitecode = IsElement('buy_invitecode') ? getObj('buy_invitecode').innerHTML : '';
	regInfo[6] 	= new Array(
						" ",
						"邀请码不能为空。",
						"邀请码错误。",
						"本站开启邀请注册,请填写邀请码!" + buy_invitecode);
	var invcode = new Element("invcode",regInfo[6],"invcode_info");
}

regInfo[7] 		= new Array(
						"已同意。",
						"请先确定已阅读并完全同意条款内容。");
var registerclause 	= new Element("registerclause",regInfo[7],"registerclause_info");

regInfo[8] 		= new Array(
						" ",
						"请输入自定义问题");
var customquested 	= new Element("customquested",regInfo[8],"customquested_info");

regInfo[9] 		= new Array(
						" ",
						"请输入答案");
var answered 	= new Element("answered",regInfo[9],"answered_info");


function permit() {
	//getObj("registerclause").disabled = 'disabled';//b445
	try {ajax.send('$db_registerfile?ajax=1&step=permit','',ajax.get);} catch(e){}
}
if (regdetail) {
	setTimeout('permit();',1000);
}
function getPwdRule(){
	var intiString 	= "";
	if(regminpwd){
		intiString 	+= "最小长度:"+regminpwd+" ";
	}
	if(regmaxpwd){
		intiString 	+= "最大长度:"+regmaxpwd+" ";
	}
	if(regnpdifferf){
		intiString	+= "密码不能与用户名相同。";
	}
	if(!pwdcomplex){
		return intiString;
	}
	var addString 	= "密码里必须包含以下字符类型:";
	var rule = pwdcomplex.split(',');
	for(var i=0;i<rule.length;i++){
		switch(Number(rule[i])){
			case 1:
				addString += "小写字母 ";
				break;
			case 2:
				addString += "大写字母 ";
				break;
			case 3:
				addString += "数字 ";
				break;
			case 4:
				addString += "符号 ";
				break;
			default:
				break;
		}
	}
	return intiString + addString;
}
<!--
EOT;
if(count($fields)){
print <<<EOT
-->
var keep = 20;
<!--
EOT;
foreach($fields as $field){
print <<<EOT
-->
<!--
EOT;
if($field[type]!='text'){
print <<<EOT
-->
getObj("$field[field]").onfocus 	= onFocus;
getObj("$field[field]").onblur 		= onBlur;
extracheck.push(getObj("$field[field]"));
<!--
EOT;
}print <<<EOT
-->
regInfo[keep] 	= new Array(
						" ",
						"本选项不能为空。",
						"$field[descrip]");
var $field[field] = new Element("$field[field]",regInfo[keep],"$field[field]"+"_info");
keep++;
<!--
EOT;
}}print <<<EOT
-->

function showcustomquest(qid){
	getObj("customquested").style.display = qid==-1 ? '' : 'none';
}
function insertOnlineSell() {
	
	var menu_editor = getObj("menu_editor");
	//menu_editor.innerHTML = '';
	read.open('menu_editor','','2');
}
</script>
<!--
EOT;
}elseif($step=='finish'){
if($email && $rg_config['rg_emailcheck']){
print<<<EOT
-->
<div id="breadCrumb">
		<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>注册
</div>
<div id="pw_content">
	<div class="p20">
		<div class="regTitle cc">
			<h5>注册</h5>
		</div>
		<table width="100%"><tr><td class="vt" height="200" style="padding-left:200px;">
		<div class="f16 b mb10">注册成功，请立即开通账户</div>
		<div class="mb10">亲爱的会员，您已经通过邮箱{$email}注册成为{$db_bbsname}大家庭中的一员了。</div>
		<div class="mb10">我们已经把激活邮件发送到了{$email}邮箱，快去激活吧！</div>
		<div class="mb20"><span class="mr20"><span class="btn"><span><button type="button" onclick="window.location.href='$emailurl'">去我的邮箱激活</button></span></span></span><a href="$db_registerfile?step=finish&email=$email&verify=$_GET[verify]&r=1" class="s4" target="_blank">再次发送激活邮件</a></div>
		<div class="ignoreTip fl"><p class="mb5">小贴士:如果你没有收到激活邮件，可能邮件被误放入垃圾邮件中了；</p>你还可以选择<a href="$db_registerfile?step=finish&email=$email&verify=$_GET[verify]&r=1" class="s4" target="_blank">再次发送激活邮件</a>来接收激活邮件。</div>
		</td></tr></table>
	</div>
</div>
<!--
EOT;
}else{
if(!$option){print<<<EOT
-->
<div id="breadCrumb">
		<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>注册
</div>
<div id="pw_content">
	<div class="p20">
		<div class="regTitle cc">
			<h5>注册</h5>
		</div>
		<form action="$db_registerfile?" method="post" name="register">
		<input type="hidden" name="verify" value="$verifyhash" />
		<input type="hidden" name="step" value="finish" />
		<input type="hidden" name="option" value="1" />
		<table width="100%"><tr><td class="vt" height="200" style="padding-left:200px;">
		<div class="f16 b mb10">恭喜您！亲爱的会员，您已经注册成功。</div>
		<div class="mb20"><span class="mr20"><span class="btn"><span><button type="submit">现在去完善资料</button></span></span></span><a href="./$db_bfn" class="s4" target="_blank">先去逛逛</a></div>
		</td></tr></table>
		</form>
	</div>
</div>
<!--
EOT;
}elseif($option==1){print<<<EOT
-->
<div id="breadCrumb">
		<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>完善资料
</div>
<div id="pw_content">
	<div class="p20">
		<div class="regTitle cc">
			<h5>完善资料</h5>
		</div>
		<table width="100%"><tr><td class="vt" height="300">
		<form action="$db_registerfile?" method="post">
		<input type="hidden" name="step" value="finish" />
		<input type="hidden" name="verify" value="$verifyhash" />
		<input type="hidden" name="option" value="2" />
			<div class="regForm">
				<dl>
					<dt><span class="bb b s4 f16">基本信息</span></dt>
					<dd>&nbsp;</dd>
					<dd class="tp">&nbsp;</dd>
				</dl>
				<dl class="cc">
					<dt>性别</dt>
					<dd class="f14">
							<label class="mr20"><input type="radio" value="1" name="regsex" />男</label>
							<label class="mr20"><input type="radio" value="2" name="regsex" />女</label>
							<label class="mr20"><input type="radio" value="0" name="regsex" checked/>保密</label>
					</dd>
				</dl>
				<dl class="cc">
					<dt>生日</dt>
					<dd class="f14">
						<select name="regbirthyear" class="mr5">
<!--
EOT;
if($rg_config['rg_timestart'] < $rg_config['rg_timeend'] && $rg_config['rg_timeend']){
for($i=$rg_config['rg_timestart']; $i<=$rg_config['rg_timeend']; $i++){print <<<EOT
-->
							<option value="$i">$i</option>
<!--
EOT;
}}elseif($rg_config['rg_timestart'] > $rg_config['rg_timeend'] && $rg_config['rg_timeend']){
for($i=$rg_config['rg_timestart']; $i>=$rg_config['rg_timeend'];$i--){print <<<EOT
-->
							<option value="$i">$i</option>
<!--
EOT;
}}print <<<EOT
-->
						</select><span class="mr10">年</span>
						<select name="regbirthmonth" class="mr5">
<!--
EOT;
for($i=1;$i<=12;$i++){print <<<EOT
-->
							<option value="$i">$i</option>
<!--
EOT;
}print <<<EOT
-->
						</select><span class="mr10">月</span>
						<select name="regbirthday" class="mr5">
<!--
EOT;
for($i=1;$i<=31;$i++){print <<<EOT
-->
							<option value="$i">$i</option>
<!--
EOT;
}print <<<EOT
-->
						</select>日
					</dd>
				</dl>
				<dl class="cc">
					<dt>来自</dt>
					<dd class="ip">
						<div><input type="text" maxlength="20" name="regfrom" /></div>
					</dd>
				</dl>
				<dl>
					<dt><span class="bb b s4 f16">联系资料</span></dt>
					<dd>&nbsp;</dd>
					<dd class="tp">&nbsp;</dd>
				</dl>
				<dl class="cc">
					<dt>QQ</dt>
					<dd class="ip"><div><input type="text" maxlength="14" name="regoicq" value="" /></div></dd>
				</dl>
				<dl class="cc">
					<dt>个人主页</dt>
					<dd class="ip"><div><input type="text" maxlength="75" name="reghomepage" value="" /></dd>
				</dl>
				<dl class="cc">
					<dt>帖子签名</dt>
					<dd>
						<textarea name="regsign" id="sign" class="textareaA" style="width:222px;"></textarea>
						<div style="padding:.5em 0;" id="signid"></div>
					</dd>
				</dl>
				<dl class="cc">
					<dt>自我简介</dt>
					<dd>
						<textarea name="regintroduce" class="textareaA" style="width:222px;" id="regintroduce"></textarea>
						<div style="padding:.5em 0;" id="regintroduceid"></div>
					</dd>
				</dl>
				<dl class="cc">
					<dt>&nbsp;</dt>
					<dd>
						<span class="btn"><span><button type="submit">下一步</button></span></span>
						<span class="bt"><span><button type="submit" name="option">跳过</button></span></span>
					</dd>
					<dd class="regTips"></dd>
				</dl>
			</div>
		</form>
		</td></tr></table>
	</div>
</div>
<script language="javascript" type="text/javascript">

var charset = '$db_charset';
var signnum = '$_G[signnum]';
var introducenum = 500;

initCheckTextNum('sign','signid',signnum);
initCheckTextNum('regintroduce','regintroduceid',introducenum);
</script>
<!--
EOT;
}elseif($option==2 || $_POST['option']){print<<<EOT
-->
<style type="text/css">
/*profileFace*/
.profileFace{width:340px;}
.profileFace ul{padding:0 0 15px;}
.profileFace li{float:left;cursor:pointer;width:62px;overflow:hidden;margin:0 10px 10px 0;}
</style>
<div id="breadCrumb">
		<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>完善资料
</div>
<div id="pw_content">
	<div class="p20">
		<div class="regTitle cc">
			<h5>上传头像</h5>
		</div>
		<table width="100%"><tr><td class="vt" height="300">
		<form id="creator" name="creator" action="$db_registerfile?" method="post" enctype="multipart/form-data" onsubmit="return setFaceLen()">
		<input type="hidden" name="step" value="finish" />
		<input type="hidden" name="verify" value="$verifyhash" />
		<input type="hidden" name="option" value="3" />
		<table width="100%" class="setTable vt">
			<tr>
				<td width="210" class="tar">
					<img src="$imgpath/face/none.gif" name="useravatars" />
				</td>
				<td style="padding-left:20px;">
				<div id="openchang">
					<label class="mr20" for="facetype1"><input type="radio" id="facetype1" name="facetype" value="1" onclick="CkFaceType(this.value)">系统头像</label>
<!--
EOT;
if($_G[allowportait]){print <<<EOT
-->
					<label class="mr20" for="facetype2"><input type="radio" id="facetype2" name="facetype" value="2" onclick="CkFaceType(this.value)">头像链接</label>
<!--
EOT;
}if($db_ifupload && $_G[upload]){print <<<EOT
-->
					<label class="mr20" for="facetype3"><input type="radio" id="facetype3" name="facetype" value="3" onclick="CkFaceType(this.value)">头像上传</label>
<!--
EOT;
}print <<<EOT
-->
					<div class="c mb10"></div>
					<div id="face1" style="display:none;">
						<div id="iconbox">
							<div class="mb10">
<!--
EOT;
if ($num >= 10) {print <<<EOT
-->
								<a onclick="showSystemIcon(0);" href="javascript:;" class="mr20">上一页</a>
								<a onclick="showSystemIcon(2);" href="javascript:;">下一页</a>
<!--
EOT;
}print <<<EOT
-->
							</div>
							<div class="profileFace">
								<ul class="cc">
<!--
EOT;
foreach ($imgname_array as $key => $value) {print <<<EOT
-->
									<li onclick="showimage('$imgpath','$value')"><img src='$imgpath/face/$value' width="50" height="50" class="img"></li>
<!--
EOT;
}print <<<EOT
-->
								</ul>
							</div>
						</div>
						<input type="hidden" name="proicon" value="$iconfile" />
					</div>
					<div id="face2" style="display:none;">
						<div class="mb10"><span class="mr20">头像链接</span><input name="httpurl[0]" id="httpurl_url" value="$httpurl" class="input input_wb mr10" type="text" /> 必须以 http://开头</div>
						<div class="mb10"><span class="mr20">头像宽度</span><input name="httpurl[1]" value="$iconwidth" class="input input_wc mr10" maxlength="3" onblur="if(1 <= this.value && this.value <= $db_imgwidth){document.images.useravatars.width = this.value;}" /> 必须是 1 -- $db_imgwidth 之间的一个整数。</div>
						<div class="mb10"><span class="mr20">头像高度</span><input name="httpurl[2]" value="$iconheight" class="input input_wc mr10" maxlength="3" onblur="if(1 <= this.value &&  this.value <= $db_imgheight){document.images.useravatars.height = this.value;}" /> 必须是 1 -- $db_imgheight 之间的一个整数。</div>
						<div>当高度和宽度留空，或只设置一个值时，则根据图片原尺寸进行缩放</div>
						<input type="hidden" id="httpurl_w" name="httpurl[3]" />
						<input type="hidden" id="httpurl_h" name="httpurl[4]" />
					</div>
					<div id="face3" style="display:none;">
<!--
EOT;
if($db_bbsifopen != 1){print <<<EOT
-->
<div class="blockquote3">
抱歉，站点正处于内部开放状态，只有在完全开放状态下，才能使用头像上传功能。<br />
<span class="gray">（站点状态的后台设置路径：核心设置 &#187; 常规设置）</span>
</div>
<!--
EOT;
}else{print <<<EOT
-->
						<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="405" id="FlashVars" align="middle">
							<param name="movie" value="js/face.swf" />
							<param name="FlashVars" value="$icon_encode_url" />
							<embed  width="500" height="405" src="js/face.swf" flashvars="$icon_encode_url" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  type="application/x-shockwave-flash" />
						</object>
<!--
EOT;
}print <<<EOT
-->
					</div>
				</div>
				</td>
			</tr>
		</table>
		<div style="padding:1em 1em 1em 225px">
			<span class="bt"><span><button type="button" onclick="javascript:history.go(-1);">上一步</button></span></span>
			<span class="mr20"><span class="btn"><span><button type="submit" id="register_success">完成</button></span></span></span>
			<a href="./$db_bfn" class="s4">跳过</a>
		</div>
	</form>
	</td></tr></table>
	</div>
</div>
<iframe id="hideframe" name="hideframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
<script language="JavaScript">
var display = '$display';
function CkFaceType(value){
	var facetype = document.getElementsByName('facetype');
	for(i=0;i<facetype.length;i++){
		if(facetype[i].value == value){
			facetype[i].checked = true;
			getObj('face' + value).style.display = '';
			if (value == '3') {
				getObj('register_success').style.display = 'none';
			} else {
				getObj('register_success').style.display = '';
			}
		} else {
			getObj('face' + facetype[i].value).style.display = 'none';
		}
	}
}
CkFaceType('1');

function setFaceLen() {
	var v = 0;
	var facetype = document.getElementsByName('facetype');
	for (i = 0; i < facetype.length; i++) {
		if (facetype[i].checked === true) {
			v = facetype[i].value;break
		}
	}
	if (v == 2) {
		var img = new Image();
		img.src = getObj('httpurl_url').value;
		getObj('httpurl_w').value = img.width;
		getObj('httpurl_h').value = img.height;
	}
	return true;
}
function showimage(imgpath,value){
	var path = imgpath + '/face/';
	facepath(path,value,false);
}
function facepath(iconurl,iconfile,showmsg,iconwidth,iconheight){
	if (showmsg) {
		if (showmsg == 'success') {
			ajax.time = setTimeout(function(){
				closep();
				showDialog('success','上传成功!',1);
			},1500);
			getObj('reupload').innerHTML = '<input class="input file" type="file" id="upload" name="upload" /><a class="abt" unselectable="on" onclick="UpLoadFace()">上传</a>';
		} else if (showmsg == 'undefined_action') {
			ajax.time = setTimeout(function(){
				closep();
				showDialog('error','非法操作');
			},1500);
			return false;
		} else {
			ajax.time = setTimeout(function(){
				closep();
				showDialog("error",showmsg);
			},1500);
			return false;
		}
	}
	document.images.useravatars.src = iconurl + iconfile + '?' + new Date().getTime();
	if (iconwidth>0) document.images.useravatars.width = iconwidth;
	if (iconheight>0) document.images.useravatars.height = iconheight;
	document.creator.proicon.value = iconfile;
	return false;
}
function showSystemIcon(page) {
	getObj('iconbox').innerHTML = '<div style="width:272px;"><div class="tac p10"><img src="'+imgpath+'/loading.gif" align="absmiddle" /> 正在加载数据...</div></div>';
	ajax.send('pw_ajax.php','action=showface&page='+page,getIcon);
}
function getIcon() {
	var iconlist = ajax.request.responseText;
	setTimeout(function(){getObj('iconbox').innerHTML = iconlist;},300);
}
function UpLoadFace(){
	if (getObj('upload').value != '') {
		var uploadform = getObj('creator');
		var oldaction = uploadform.action;
		var oldonSubmit = uploadform.onSubmit;
		uploadform.action = '$db_registerfile?step=finish&option=ajaxface';
		uploadform.onSubmit = '';
		uploadform.target = 'hideframe';
		uploadform.submit();
		uploadform.action = oldaction;
		uploadform.onSubmit = oldonSubmit;
		uploadform.target = '';
		read.obj = getObj('upload');
		read.guide();
		document.onmouseout = '';
	} else {
		showDialog("error","请选择要上传附件");
	}
}
</script>
<!--
EOT;
}}}elseif($step=='permit'){print<<<EOT
-->
<div style="width:480px;">
<div class="popTop cp" onmousedown="read.move(event);">条款内容</div>
<table width="100%">
	<tr>
		<td>
			<div style="width:460px; height:220px; overflow:auto; border:1px solid #eee">
				$rg_config[rg_rgpermit]
			</div>
		</td>
	</tr>
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" onclick="unpermit();">同 意</button></span></span></div>
<script language="JavaScript">
function unpermit() {
	getObj("registerclause").disabled = '';
	getObj("registerclause").checked = 'checked';
	closep();
}
</script>
<!--
EOT;
}print <<<EOT
-->
<div id="menu_editor" style="display:none;">
<div class="popout"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="bgcorner1"></td><td class="pobg1"></td><td class="bgcorner2"></td></tr><tr><td class="pobg4"></td><td>
<div class="popoutContent">
	<div style="width:400px;">
		<div class="popTop" onmousedown="read.move(event);" style=" cursor:move;"><span class="adel cp" onclick="closep();">关闭</span>购买邀请码</div>
			<form action="$db_registerfile?" method="post">
			<input type="hidden" name="action" value="pay" />
			<input type="hidden" name="step" value="3" />
			<div class="p10"><div class="ignoreTip" style="border-left:0;border-right:0;">购买一个邀请码需要$inv_config[inv_price]元，有效期$inv_config[inv_days]天，请及时注册</div></div>
<!--
EOT;
if(!empty($_POST['step'])){print <<<EOT
-->
			<div class="p10" style="padding-top:0;"><div class="rightTip">提示：您输入的邮箱中 ($email) 已经有一个生成订单，您确定现在支付？<input type="hidden" name="submit" value="1" /></div></div>
<!--
EOT;
}print <<<EOT
-->
			<table width="100%" class="vt">
				<tr>
					<td style="padding-left:20px;">购买的个数</td>
					<td><input class="input input_wa" type="text" name="invnum" value="$num" /></td>
				</tr>
				<tr>
					<td style="padding-left:20px;">接收邀请码的邮箱</td>
					<td><input class="input input_wa mb5" type="text" name="email" value="$email" /><p>我们会将邀请码发送到这个邮箱</p></td>
				</tr>
			</table>
			<div class="popBottom"><span class="btn2"><span><button type="submit">确认购买</button></span></span></div>
			</form>
	</div>
</div>
</td><td class="pobg2"></td></tr><tr><td class="bgcorner4"></td><td class="pobg3"></td><td class="bgcorner3"></td></tr></tbody></table></div>
</div>
<!--
EOT;
?>-->
